This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 19, 2012, 11:43 AM
135 Posts
topic has been resolvedResolved

30 Java elements (Code/Java) causes 45 minutes build time

  • Category: Other Domino Designer Tooling
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: designer client,slow
  • Replies: 11
 Hi,
 
I added 30 Java design elements (Classes) to my application. They contain probably a few thousand lines of code and use a few JARs which are also in the NSF. After adding those the build time went from 0 to 45 minutes! Designer is showing this "Building workspace" progress bar which slowly works its way to 100%. I'm accessing the server via 24/1M ADSL line which af course is part of the problem but I still think 45 minutes is too much. When I switched to a local replica, the build time went to 0 sec. But I cannot work on local replica in this project, there are all kinds of integrations which work via the server. So after each change I have to replicate my changes to the server for testing. So far I've tried:
  1. jvm.properties -> vmarg.Xmx=-Xmx1024m, vmarg.Xms=-Xms1024m
  2. Compress TCPIP traffic in Domino client and server. 
  3. Build manually only 
None of these have helped. Compressing caused the build time to increase to 60 minutes. If I don't build, my changes are not there when I test. One solution is to develop the Java part separately and have it as a JAR file in the NSF but that's even slower than local replica.
 
Any ideas how to fix this slowness?
 
Thanks, 
 
- Panu 
Jun 19, 2012, 12:51 PM
126 Posts
Re: 30 Java elements (Code/Java) causes 45 minutes build time
The recommended approach that I was told was to use the local replica, the reason its so slow is that it is trying to compile the java over the network, this will also use up a lot of bandwidth for anyone else on the network.
 
In my working environment my setup is to have the same version server as the one to be deployed on running on my local machine, test it on that and replicate my changes either when I've hit a certain point or at the end of the day if its stable. As far as I am aware there is no way around this. I have followed this type of a pattern when developing web applications on multiple platforms, I don't think this is an issue with XPages or Domino, more just an all purpose best practise.
Jun 19, 2012, 1:19 PM
135 Posts
Re: 30 Java elements (Code/Java) causes 45 minutes build time
Thanks for sharing your experiences. Of course I'm also comparing to Domino 7 where everything is lightning fast. Maybe I'm wrong but I thought these new versions and features are supposed to make use more productive. I haven't seen that yet: all development is much slower than it used to be (for many reasons).
 
I guess I need to setup a Domino server on my computer and try to make it available to internet (which is required in this case) althought I don't have a static IP. Somehow it seems you need a workaround for everything with XPages and Domino 8.5.
 
- Panu 
 
 
Jun 19, 2012, 2:06 PM
126 Posts
Re: 30 Java elements (Code/Java) causes 45 minutes build time
I haven't used many of the older versions so I can't comment on that, but as regards this being a workaround I have to disagree, through work / college I have used XPages / domino, java / tomcat and ASP.NET + C# / IIS and in all
cases / projects I have had a server set up on my machine to test on before deploying to production as this type of problem occurs no matter what the platform is, the only way around this would be to set up a dev environment on the machine with the server and remote into it as any other way would require compiling over the network.
 
why would your local / test server need a static IP ? could you not just use the machines IP address or localhost since it will be on the same machine ?
 
Simon 
Jun 19, 2012, 2:34 PM
135 Posts
Re: 30 Java elements (Code/Java) causes 45 minutes build time
Yes, looks like it was a big advantage of Domino to be able to develop using a network server. I wonder what is the advantage now compared to all other tools out there.
 
My application has integrations (for example it receives HTTP get requests from an other server in internet). That's why it needs to be accessible from internet. Of course I could come up with another workaround for this during development but these workarounds are really building up. 
Jun 19, 2012, 2:49 PM
586 Posts
Re: 30 Java elements (Code/Java) causes 45 minutes build time
 Panu,
 
I highly recommend coding on your local machine.  Not a server on your local machine but a simple template on your local notes client.  That should improve your java issues, but also set you up better for true source control - Mercurial or Git - which would have been impossible in the older versions of Designer anyway. 
 
 It's really not a big deal to develop locally - but have a test database on the server and just refresh the design.
Jun 19, 2012, 3:03 PM
135 Posts
Re: 30 Java elements (Code/Java) causes 45 minutes build time
 Yes, that's what I'm doing now and manually replicating the changes to the server after each change. Especially with UI-development this can be several times / minute.
Jun 19, 2012, 3:18 PM
14 Posts
Re: 30 Java elements (Code/Java) causes 45 minutes build time
If I can add my two cents in the discussion, I noticed adding jar files inside the nsf will slow down compilation a lot.
 
What I did is add the jar files as external jar in the Java Build Path. 
 
The bad part is you have to add the jars on every developpers machine file system AND on the server file system too.... 
 
But after that the compilation speed was back as it was before.
 
To add as external jar, first put all your jar files in the notes\jvm\lib\ext of your notes client and in the domino\jvm\lib\ext. of the servers. You probably have to restart the client and the server (I don't remember it was necessary or not).
 
Then in the designer,
 
1.open the package explorer,
2. find you DB in the list then rightclick on it
3.Choose Build Path->Configure Build Path in the context menu
4. Go into the library Tab 
5. Click on "add external Jars" 
6. Select all the jars files you need in your jvm\lib\ext and click the "Open" button
7. Click the OK button to validate your changes in the Build Path 
 
 And it should now build your apps with the same speed as it was before.
 
At least it worked for me, so I hope it will be the same for you ! 
 
Hope this helps 
 
Renaud 
 
Jun 19, 2012, 5:06 PM
586 Posts
Re: 30 Java elements (Code/Java) causes 45 minutes build time
 I'm really not a Java guy so I don't have too much to add.  This might be a good question to ask about on StackOverFlow as there are more Java/Xpages guys hanging out there.
 
Anway...  
 
First - I would NOT replicate a locale design template, as that would mess up any potential source control.  I would simply refresh design.  Ideally each developer should have their own non copy design template and you move the changes around via source control. 
 
Second - Depending on these  30 Java design elements and how stable they are etc...  you might want to consider making you're own internal ext.library and putting them in there.  Then they should be available to any application on the server and not need to get rebuilt each time.  Internally we've done this...  not really for Java code yet, but for other things like @functions and SSJS and such, but Java shouldn't be a problem.  It's not that hard to deploy to different servers and such as well.  so maybe that's a thought.
 
Lastly...  in your original post you mentioned Java Design elements.  Are you doing all this in the new 8.5.3 design element vs. going through the package explorer route?  The new Java design element is "flaky" at best so if you're using it you might get some improvements with Package explorer.  Just a thought. 
 
 
Jun 19, 2012, 7:07 PM
135 Posts
Re: 30 Java elements (Code/Java) causes 45 minutes build time
Renaud, thank you! I removed the NSF jar lib from the build path (I already had the jars in /jvm path on my disk) and the build time went back to 0-3 sec! You were right: it's not the Java code, it's the jars. The application uses some pretty heavy jars (Apache POI) and that is causing the problem. I would prefer to have also the jars in the NSF but I guess I can't have everything!
 
Btw. my experience is that I don't have to do the steps 1-7. It seems to be enough to just add the jars to /jvm path. 
 
- Panu 
 
 
 
Jun 19, 2012, 7:43 PM
14 Posts
Re: 30 Java elements (Code/Java) causes 45 minutes build time
Panu,
 
I'm glad it helped ! ;-)
 
You're right, if you have it in the jvm or jvm\lib\ext in your client and server it's enough (no need for the seven steps).
 
I had to do those steps because at work we have a lot of security on our workstation and I don't have write access to the jvm directory, so I had to put the jar files in my notes\data directory (where I can write) and then I had to follow these seven steps to have the java environnement to find the jar files.
 
But as you said, I would prefer to have the jars in the NSF as it's easier to just replicate a DB and not have to care about adding jar files on each server, but for the moment I can live with it ! ;-)
 
Have a nice evening
 
Renaud
Jun 20, 2012, 11:08 AM
135 Posts
Re: 30 Java elements (Code/Java) causes 45 minutes build time
David,
 
Thanks for your comments. Here are my answers: 
 
First - Design refresh is a bit slower to do than replicating, that's why I chose replica. I haven't used source control in Domino yet and know nothing about it. That's one of the many things to learn at some point.
 
Second - With strong Domino background I hate the idea of taking the code out of the NSF and losing replication etc.  But I agree that in some cases this might be the right solution.
 
Lastly - Yes I'm using the Java design elements. Can you tell me more about their flakiness? I just tried if moving the Java source to WEB-INF would solve the build time problem but it didn't.
 
Anyway I now have the JARs on disk and everything is fast again althought it's not a perfect solution.
 
- Panu 
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal